package com.property.demo.service;

import com.property.demo.model.Vehicle;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface VehicleService {

    List<Vehicle> findAll();
    
    Page<Vehicle> findAll(Pageable pageable);
    
    Page<Vehicle> findByFilters(Long ownerId, String licensePlate, String brand, String type, String status, Pageable pageable);
    
    Optional<Vehicle> findById(Long id);
    
    Vehicle save(Vehicle vehicle);
    
    Vehicle update(Long id, Vehicle vehicleDetails);
    
    void delete(Long id);
    
    void deleteAll(List<Long> ids);
    
    List<Vehicle> findByOwnerId(Long ownerId);
    
    Optional<Vehicle> findByLicensePlate(String licensePlate);
    
    List<Vehicle> findByLicensePlateContaining(String licensePlate);
    
    List<Vehicle> findByBrand(String brand);
    
    List<Vehicle> findByType(String type);
    
    List<Vehicle> findByStatus(String status);
    
    boolean existsByLicensePlate(String licensePlate);
} 